<!DOCTYPE html>
<html>
<title>登陆 | spinach</title>
<@h.head />
<link rel="stylesheet" type="text/css"
	href="${path}/static/css/login.css" />
<body>
	<div class="container">

		<form class="form-signin login-form" action="${path}/login.json" id="fm"
			method="post">
			<h2 class="form-signin-heading">登录系统</h2>
			<div class="alert alert-error hide">
				<span>请输入用户名或密码.</span>
			</div>
			<div>
				<input type="text" name="username" class="input-block-level"
					placeholder="账号" value="demo" datatype="*" nullmsg="请输入用户名！" /> <span
					class="Validform_checktip"></span>
			</div>
			<div>

				<input type="password" name="password" class="input-block-level"
					placeholder="密码" value="123456" datatype="*" nullmsg="密码不能为空！" />
				<span class="Validform_checktip"></span>
			</div>
			<div style="display: none;">
				<input type="text" name="verify" class="input-medium"
					placeholder="验证码">
			</div>

			<p>
				<button class="btn btn-large btn-primary" type="submit">登录</button>
			</p>
		</form>
	</div>
	<@h.foot />
	<script type="text/javascript">
		var callback = function(data) {
			if (data.status == "0") {
				window.location.href = "${path}/index";
			} else {
				$('.alert-error', $('.login-form')).find("span").html(data.msg);
				$('.alert-error', $('.login-form')).show();
			}
		}
		$("#fm").validFrom(callback);
	</script>
</body>
</html>